<!DOCTYPE>
<html>
<head>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>游戏</title>
<%@ include file="../common/home_head.jsp"%>
</head>
<body style="background:#FFF;">
<script type="text/javascript">
$(document).ready(function(){
	$("#nav li").removeClass("active");
	$("#nav>li").eq(2).addClass("active");
	//var l='${fn:length(games)}';
	//var s=0;
	//if(l%5>0)
	//	s=l/5+1;
	//else
	//	s=l/5;
	//$("#pageInf").html("当前页数：1 总页数："+parseInt(s));
	
});
</script>
	<div class="sub-banner">
		<%@ include file="../common/navbar.jsp"%>
	</div>
	<div class="events-section2-agileinfo">
		<div class="container">
			<div class="w3ls_search">
				<form action="${pageContext.request.contextPath }/search" method="post">
					<input type="text" name="key" placeholder="<%=request.getAttribute("key")==""?"":request.getAttribute("key") %>" required="">
					<input  type="submit" value=" ">
				</form>
			</div>
			<c:if test="${!empty games }">
				<c:forEach items="${games }" var="g" end="4">
					<div class="blog2-w3ls">
						<div class="col-md-4 blog-image-w3l">
							<a
								href="${pageContext.request.contextPath }/getPalyDetail?gid=${g.palyId}"><img
								src="${pageContext.request.contextPath }/images/games/${g.palyImg}"
								alt="${g.palyName }" /></a>
						</div>
						<div class="col-md-8 blog-text-w3ls">
							<a
								href="${pageContext.request.contextPath }/getPalyDetail?gid=${g.palyId}"><h4>${g.palyName }</h4></a>
							<div class="item_info">
								<ul>
									<li><a href="#"><i class="glyphicon glyphicon-user"></i>${g.palyDeveloper.devName }</a></li>

									<li><i class="glyphicon glyphicon-tags"></i>${g.palyType.typeName }</li>
									
									<li><i class="glyphicon glyphicon-heart"></i>${g.palyHot }热度</li>
								</ul>
							</div>
							<p>${g.palyIntroduce}</p>
							<a
								href="${pageContext.request.contextPath }/getPalyDetail?gid=${g.palyId}"
								class="blog-read">查看更多</a>
						</div>
						<div class="clearfix"></div>
					</div>
				</c:forEach>
			</c:if>
			<c:if test="${empty games }">
				<h1>暂时没有找到你想要的游戏</h1>
			</c:if>
		</div>
		<!-- <%@ include file="../common/footer-page.jsp" %> -->
	</div>

	
	<%@ include file="../common/footer.jsp"%>
	<%@ include file="../common/loginModal.jsp"%>
</body>
</html>